Validate quiver otel_* event names at compile time#2977
Open
cijothomas wants to merge 3 commits into
Open
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2977 +/- ##
==========================================
- Coverage 85.96% 85.95% -0.01%
==========================================
Files 725 725
Lines 276289 276299 +10
==========================================
- Hits 237503 237499 -4
- Misses 38262 38276 +14
Partials 524 524
🚀 New features to boost your workflow:
|
Contributor
|
LGTM. Thanks @cijothomas! |
AaronRM
approved these changes
May 14, 2026
lalitb
approved these changes
May 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Follow-up to #2957 that applies the same compile-time event-name validation to the quiver crate's local logging macro copies.
Changes:
- Adds
pub(crate) const fn validate_event_nametoquiver/src/logging.rsenforcing non-empty, no-whitespace event names. - Wraps each macro arm (
otel_info!,otel_warn!,otel_error!,otel_debug!,otel_event!) in a block and invokes the validator viaconst _: () = ...for compile-time enforcement.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2957, which intentionally skipped the local macro copies in the
quivercrate.Zero runtime cost (compile-time only). All existing quiver call sites already use short stable identifiers (e.g.
quiver.wal.rotate), so no call-site updates were required.